import { queryOwnerInfo } from '@/pages/data/qrcode_owner/service';

export default {
  namespace: 'qrcode_owner',

  state: {
    details: {},
  },

  effects: {
    *queryInfo(_, { call, put }) {
      const response = yield call(queryOwnerInfo);
      yield put({ type: 'setInfo', payload: response })
    }
  },

  reducers: {
    setInfo(state, action) {
      return {
        ...state,
        details: action.payload
      }
    }
  }
}
